package com.kcs.dc.service.impl;

import java.text.DecimalFormat;
import java.text.NumberFormat;

import com.kcs.common.utils.commonUtils;
import com.kcs.dc.service.bean.request.wsInquiryReqBody;
import com.kcs.dc.service.bean.request.wsInquiryReqHeader;
import com.kcs.dc.service.bean.request.wsInquiryRequest;
import com.kcs.dc.service.bean.response.wsInquiryResponse;
import com.kcs.dc.service.logic.inquiryGenerateBL;

public class wsInquire  {

	public wsInquire() {
		// TODO Auto-generated constructor stub
	}
	
    public wsInquiryResponse wsInquire(wsInquiryRequest request){
    	inquiryGenerateBL resp = new inquiryGenerateBL();
    	
		return resp.generateResponse(request);     	
    }
    
    
    /*public static void main(String args[]) {

    	wsInquiryReqHeader h = new wsInquiryReqHeader();
    	h.setRequestID("Bee20130830001");
    	h.setServiceID("WS0001");
    	h.setSystem("TEST");
    	
    	wsInquiryReqBody b = new wsInquiryReqBody();
    	b.setDealId("485766");
    	b.setCifNumber("");
    	b.setCcy1("USD");
    	b.setBuySell("S");
    	b.setValueDate("");
    	
    	wsInquiryRequest req = new wsInquiryRequest(h, b);
    	wsInquire inq = new wsInquire();
    	wsInquiryResponse res = inq.wsInquire(req);
    	
    	System.out.println("RequestID : " + res.getHeader().getRequestID());
    	System.out.println("ServiceID : " + res.getHeader().getServiceID());
    	System.out.println("System : " + res.getHeader().getSystem());
    	System.out.println("resp_code : " + res.getHeader().getRespCode());
    	System.out.println("resp_desc : " + res.getHeader().getRespDesc());
    	System.out.println("Number Recorde : " + res.getHeader().getNumberOfRec());
    	System.out.println("respTime : " + res.getHeader().getRespTime());
    	
    	for (int i = 0; i < res.getBody().length; i++) {
    		System.out.println("dealID : " + res.getBody()[i].getDealId());
    		System.out.println("parentID : " + res.getBody()[i].getParentId());
    		System.out.println("cifNumber : " + res.getBody()[i].getCifNumber());
    		System.out.println("custName : " + res.getBody()[i].getCustName());
    		System.out.println("transType : " + res.getBody()[i].getTransType());
    		System.out.println("buySell : " + res.getBody()[i].getBuySell());
    		System.out.println("dealDate : " + res.getBody()[i].getDealDate());
    		System.out.println("valueDate : " + res.getBody()[i].getValueDate());
    		System.out.println("ccy1 : " + res.getBody()[i].getCcy1());
    		System.out.println("dealAmt1 : " + res.getBody()[i].getDealAmt1());
    		System.out.println("exchRate : " + res.getBody()[i].getExchRate());
    		System.out.println("ccy2 : " + res.getBody()[i].getCcy2());
    		System.out.println("equiAmt : " + res.getBody()[i].getEquiAmt());
    		System.out.println("outstdAmt : " + res.getBody()[i].getOutsdAmt());
    		System.out.println("instrumentType : " + res.getBody()[i].getInstrumentType());
    		System.out.println("branch : " + res.getBody()[i].getBranch());
    		System.out.println("comments : " + res.getBody()[i].getComments());
    		System.out.println("makerID : " + res.getBody()[i].getMakerId());
    		System.out.println("ibcCode : " + res.getBody()[i].getIbcCode());
    		System.out.println("documentType : " + res.getBody()[i].getDocumentType());
    		System.out.println("lastModifyDate : " + res.getBody()[i].getLastModifyDate());		
		}    	    	

    }  */

}
